//滤镜夜视仪 2018.04.16

nvMode_k1 = if(isNil "nvMode_k1")then[{0},{nvMode_k1 + 1}];
if (nvMode_k1 >= 4) exitWith {};

switch nvMode_k1 do {
	case 0: {
		NVG_Effect_K1 = ppEffectCreate ["colorCorrections", 8110];
		NVG_Effect_K1 ppEffectAdjust [1, .8, 0, [1, 1, 1.2, .1], [1, 3.8, 1.1, .9], [3, .5, 1.5, 1]];
		NVG_Effect_K1 ppEffectCommit 1;
		NVG_Effect_K1 ppEffectEnable true;
		NVG_Effect_K1 ppEffectForceInNVG true; //应用到夜视仪
	};
	case 1: {
		NVG_Effect_K1 ppEffectAdjust [1, .8, 0, [1, 1, 1.2, .1], [1, 3.8, 1.1, .8], [3, .5, 1.5, 1]];
		NVG_Effect_K1 ppEffectCommit 1;
		NVG_Effect_K1 ppEffectEnable true;
	};
	case 2: {
		NVG_Effect_K1 ppEffectAdjust [1.02, .8, 0, [1, 1, 1.2, .1], [1, 3.8, 1, .5], [2, 1.8, 1.8, 1]];
		NVG_Effect_K1 ppEffectCommit 1;
		NVG_Effect_K1 ppEffectEnable true;
		NVG_Effect_K1 ppEffectForceInNVG false;
	};
	case 3: {
		NVG_Effect_K1 ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0,0,0,0]]; 
		NVG_Effect_K1 ppEffectCommit 1;  
		NVG_Effect_K1 ppEffectEnable true;
		sleep 1;
		ppEffectDestroy NVG_Effect_K1;
		nvMode_k1 = nil;
	};
};


